<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/1
 * Time: 15:47
 */
namespace verdor;
use verdor\user\userr;
use verdor\user\VIP1;
use verdor\user\VIP2;
use verdor\user\VIP3;
require 'user\userr.php';
require 'user\VIP1.php';
require 'user\VIP2.php';
require 'user\VIP3.php';
class manager
{
    private $arr=[];
    public function OpenSite(){
        $this->arr[]=$this->createUser(0);
        $this->arr[]=$this->createUser(1);
        $this->arr[]=$this->createUser(2);
        $this->arr[]=$this->createUser(3);
    }
    public function createUser($aa){
        $usr = null;
        switch ($aa){
            case 0;
                $usr=new userr();
                break;
            case 1;
                $usr=new VIP1();
                break;
            case 2;
                $usr=new VIP2();
                break;
            case 3;
                $usr=new VIP3();
                break;
        }
        $this->showOnlineNum();
        $usr->mylevel();
        $usr->privilege();
        return $usr;
    }
    private function showOnlineNum(){
        echo '在线人数：'.userr::getOnlineNum().'人<br/>';
    }
    public function CloseSite(){
        echo '<br/>网站关闭<br/>';
    }

}
$manager = new manager();
$manager->OpenSite();
$manager->CloseSite();